const P = new Promise((resolve, reject)=>{
console.log('==========promise中的同步=========')
const num = Math.random()
   setTimeout(()=>{
    resolve(num)
   },3000)
  })

// P.then((res)=>{
//   console.log('异步任务成功',res)
// },(reason)=>{
//   console.log('异步任务成失败',reason)
// })
async function getRes () {
  const aa = await 1233444
  const BB = await P
  console.log('async',aa);
//   console.log('async',BB);
  return  aa
}
console.log('11111'+getRes())

// function a() {
//     console.log('mmmmm')
// }
// console.log('a'+a())





